# Contributor: Andrej Kolchin <KAAtheWise@protonmail.com>
# Maintainer: Andrej Kolchin <KAAtheWise@protonmail.com>
pkgname=scc
pkgver=3.1.0
pkgrel=5
pkgdesc="Very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go"
url="https://github.com/boyter/scc"
arch="all"
license="MIT"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/boyter/scc/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o bin/scc
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/scc -t "$pkgdir"/usr/bin
}

sha512sums="
ecf47ae92806c2e4c696b99d7b5ef4f24527708c9e8d452d0341c00bd93ed7523f165e429b38c1a269f168793aabf95291e43b4f9a1dc8c5a79127fd5fe16721  scc-3.1.0.tar.gz
"
